package spoon.bet365.dao;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import spoon.bet365.domain.League;

@Repository
public class Bet365DaoImpl extends SqlSessionDaoSupport implements Bet365Dao {

	@Autowired
	protected void init(SqlSessionFactory sqlSessionFactory) {
		this.setSqlSessionFactory(sqlSessionFactory);
	}

	@Override
	public void delete(League league) {
		getSqlSession().delete("bet365.delete", league);
	}
	
	@Override
	public Integer addBetting(League league) {
		return getSqlSession().insert("bet365.insert", league);
	}

}
